{% load crispy_forms_tags %}
{% load staticfiles %}

<div class="section-container auto" data-section>
  <div class="content" data-section-content>
    <div class="row">
      <h2>Login</h2>
    </div>
    <div class="row">
      {% if login_error %}
      <div class="alert-box alert">
        {{ login_error }}.
      </div>
      {% endif %}
      <div class="large-8 columns large-centered">
        {% crispy login_form %}
        <input type="hidden" name="next" value="{{ next }}" />
      </div>
    </div>
  </div>
  <a class="close-reveal-modal">&#215;</a>
</div>


<script>
$('.button.secondary').click(function(e) {
  e.preventDefault();
  $('#login-modal').foundation('reveal', 'close');
});
</script>
